package com.credit.web.basic;

import java.util.Map;


import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.credit.context.CreditServletContext;
import com.credit.service.CreditBaseParamService;
import com.credit.web.basic.bean.ResBean;

@Controller
@RequestMapping("/option")
public class OptionController {
	
	@Autowired
	private CreditBaseParamService creditBaseParamService;
	
	
	
	@ResponseBody
	@RequestMapping(value = "/list")
	public void list() throws IllegalArgumentException, IllegalAccessException {
		
		Map<String,Object> returnMap = creditBaseParamService.getParamsMap();
		
		ResBean resBean = CreditServletContext.getResBean();
		resBean.getData().put("options", returnMap);
		CreditServletContext.setResBean(resBean);
	}
	


}
